Scan-based testing has been extensively used in industry to reduce test cost. In the scan-based testing, state elements in a design such as latches and flip-flops are replaced by scan cells and the scan cells are then stitched together to create one or more scan chains. The controllability and observability of the scan cells enable significant reduction of the test cost. When all of the state elements in a design are replaced by scan cells, the resulted design is called a full-scan design. When a portion of state elements is replaced by scan cells, the resulted design is called a partial scan design.
Compared with a non-scan state element, a scan cell requires extra area to accommodate additional gates and control signals for the test function. This leads to performance degradation and higher power consumption. Routing the non-functional scan enable signal to each scan cell also causes routing congestion. The use of partial scan can reduce area overhead, power consumption, and extra delay by converting a smaller number of state elements to scan cells. The test coverage (percentage of defects that can be detected), however, can be affected accordingly. The adverse effect may be severe if the state elements to be converted to scan cells are not selected properly.
Scan cells may be selected based on a structural analysis. In the structural analysis, a structural dependency graph (S-graph) is first created based on connections between state elements. Different methods may then be applied by analyzing the S-graph. One conventional method breaks all feedback loops (including self-loops) so that the resulting design behaves like a pipeline during testing. In industrial designs, especially microprocessor designs, it is common that a majority of state elements have self-loops. Breaking all of the loops is difficult if not impossible to meet the desired percentage of state elements to be converted to scan cells.
Another structural analysis-based method breaks all feedback loops except self-loops. Leaving self-loops intact, however, may cause a significant loss of test coverage because it may be difficult or even impossible to have a test sequence to set the next state of a state element with self-loop to a desirable value when initializing this state element from unknown. Moreover, feedback loops may not always cause test generation problems. If the state elements including in a feedback loop are easy to be controlled from primary inputs or other sequential elements outside the loop, it is unnecessary to break such a sequential loop.
Still another structural analysis-based method is based on sequential depth information of state elements. This method ignores the complexity of combinational circuits between sequential elements and thus may lead to a selection of scan cells that could not yield desired test coverage.
In addition to the structural analysis-based methods, test generation-based methods have also been developed. For example, information derived from a test pattern generator can be used to guide the scan cell selection incrementally so that aborts or untestable-faults would be detected after more state elements become scan cells. However, these methods suffer from extreme high computational complexity and are not feasible for large designs.